package net.lcqf.websocket.send;

import java.util.EnumMap;
import java.util.Map;

/**
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2021-2025 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2025/4/16 11:57
 * // +----------------------------------------------------------------------
 */
public enum RequestType {

    // 加入房间
    JOIN_ROOM,
    // 聊天
    SEND_CHAT,
    // 心跳包
    PING,
    // 战斗结束
    BATTLE_END;

    private static final Map<RequestType, Integer> TYPE_ORDINAL = new EnumMap<>(RequestType.class);
    static {
        TYPE_ORDINAL.put(JOIN_ROOM, 11);
        TYPE_ORDINAL.put(SEND_CHAT, 12);
        TYPE_ORDINAL.put(PING, 13);
        TYPE_ORDINAL.put(BATTLE_END, 15);

    }

    public int getCustomOrdinal() {
        return TYPE_ORDINAL.get(this);
    }
}
